import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data: data
  })
}

export function logout() {
  return request({
    url: '/api/login/logout',
    method: 'post',
    data: {}
  })
}

export function getSms(account) {
  return request({
    url: '/api/login/sms',
    method: 'post',
    data: {
      account: account
    }
  })
}

export function getInfo(token) {
  return request({
    showLoading: false,
    url: '/api/login/info',
    method: 'post',
    data: {
      token: token
    }
  })
}

export function getAuth() {
  return request({
    url: '/api/login/auth',
    method: 'post',
    data: {}
  })
}
